import React from 'react';
import ReactDOM from 'react-dom';
import KaoqinpushApp from '../components/kaoqinpushrouter.jsx';
import '../css/custom.css';
import Axios from "axios";
import { baseUrl } from "./config.js";

Axios.defaults.baseURL = baseUrl;

//获得学生分班级/教职工当日考勤进出统计
export let getStudentAndOtherRoleInOutRecord = (department, timePre, timeAfter) => {
    return (
        Axios.post(baseUrl+"weChatSystem/getStudentAndOtherRoleInOutRecord", {
                department : department,
                timePre: timePre,
                timeAfter: timeAfter
            
        })
    );
};
//获得学生/教职工总人数
export let getSchoolUserTypeCount = (department) => {
    return (
        Axios.post(baseUrl+"weChatSystem/getSchoolUserTypeCount", {
                department : department,
        })
    );
};
//获得学校名字
export let getSchoolNameById = (department) => {
    return (
        Axios.post(baseUrl+"weChatSystem/getSchoolNameById", {
                department : department,
        })
    );
};

//学生具体班级当日入/到学校考勤统计
export let getStudentInOutRecordDetail = (department, timePre, timeAfter) => {
    return (
        Axios.post(baseUrl+"weChatSystem/getStudentInOutRecordDetail", {
            department : department,
            timePre: timePre,
            timeAfter: timeAfter
        })
    );
};
//学生具体班级当日出入学校具体人员姓名考勤统计
export let getInOutRecordDetailStudentName = (department, timePre, timeAfter, enter, grade) => {
    return (
        Axios.post(baseUrl+"weChatSystem/getInOutRecordDetailStudentName", {
            department : department,
            timePre: timePre,
            timeAfter: timeAfter,
            enter: enter,
            grade: grade
        })
    );
};

ReactDOM.render(<KaoqinpushApp />, document.getElementById('root'));